Implementations of the method may include one or more of the following features. Obtaining a result of the context classification from the classifier; and forwarding the result to an entity from which the request was received. The resource usage level for the context classification is related to at least one of a number of sensor features utilized, classification technique employed, duty cycle of the classifier, or parameters associated with the classification technique employed. The granularity input is selected from a predefined set of granularity settings. Identifying subsets of available outputs for the context classification; and assigning granularity levels to respective ones of the subsets of available outputs. Receiving a granularity input comprising one of the subsets of available outputs for the context classification; and causing the classifier to perform the context classification by selecting an output from the subset of available outputs received as the granularity input at the resource usage level assigned to the granularity level. The context classification includes one or more of a motion state classification, a location state classification, or an audio state classification. Receiving, at an application programming interface (API), the request for the context classification from a requesting application.